﻿/*----------------------------------------------------------------
 * 
 * 版权所有：Copyright (C) 2013
 * 
 * 文件名：MediaConfiguration.cs
 * 文件功能描述：
 * 
 * 
 * 作 者：zhangq
 * 邮 箱：ifunnyface@outlook.com
 * 日 期：2013-04-15 22:54:03
 * 
 * 
 * 修改标识： Author
 * 修改描述： 相关描述
 * 
 * ---------------------------------------------------------------- */

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using DomainModel;

namespace Infrastructure.Mapper
{

    /// <summary>
    /// 
    /// </summary>
    public class MediaConfiguration : EntityTypeConfiguration<MediaInfo>
    {

        /// <summary>
        /// 
        /// </summary>
        public MediaConfiguration()
        {
            ToTable("CTB_Medias");
            HasKey(m => m.Id);
            Property(m => m.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            Property(m => m.CompanyId).IsRequired();
            Property(m => m.Title).HasMaxLength(100);
            Property(m => m.MediaUrl).HasMaxLength(255);
            Property(m => m.UploadDate);
            Property(m => m.MediaHtml);
        }

         
    }

}